<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const arr = [
        {id: 1, name: 'zs', status: true, price: 11, count: 1},
        {id: 2, name: 'ls', status: false, price: 12, count: 2},
        {id: 3, name: 'gs', status: true, price: 16, count: 4}
    ]
    let count = 0
    arr.filter(item=>item.status).forEach(item => {
        count += item.price * item.count
    })
    console.log(count)

    const result = arr.filter(item=>item.status).reduce((amt,item)=>{
        return amt += item.price * item.count
    },0)
    console.log(result)
</script>
</body>
</html>